package com.flying.rp.chapter3.model;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import org.springframework.lang.NonNull;

import java.util.Collection;

@Data(staticConstructor = "of")
@Builder(builderClassName = "NewsLetterTemplate", builderMethodName = "template")
@AllArgsConstructor
public class NewsLetter {
    @NonNull
    private final String title;
    private final String recipient;
    @NonNull
    private final Collection<News> digest;

}
